#include<iostream>

int main()
{
    using namespace std;
    long seconds;
    int days,hours,minutes;
    const int seconds_per_minutes = 60;
    const int minutes_per_hours = 60;
    const int hours_per_days = 24;

    cout << "Enter the number of seconds:";
    cin >> seconds;
    long seconds_begin = seconds;
    minutes = seconds / seconds_per_minutes;
    seconds = seconds % seconds_per_minutes;
    hours = minutes / minutes_per_hours;
    minutes = minutes % minutes_per_hours;
    days = hours / hours_per_days;
    hours = hours % hours_per_days;
    cout << seconds_begin << " seconds = " << days << " days," ;
    cout << hours << " hours," << minutes << " minutes," << seconds << " seconds" << endl;

    return 0;
}